{% extends "default_layout.html" %}
{% block main %}
	<div class="row">
		<form role="form" method="post" action="/admin/update_post">
			<input type="hidden" name="id" value="{{ post['_id'] }}" />
			<div class="form-group">
		    <label for="title">Title</label>
		    <input type="text" class="form-control" id="title" name="title" autofocus="autofocus" value="{{ post['title'] }}"/>
		  </div>
		  <div class="form-group">
		    <label for="content">Content</label>
		    <textarea class="form-control" id="content" name="content" rows="20">{{ post['content'] }}</textarea>
		  </div>
			<div class="form-group">
		    <label for="tags">Tags</label>
		    <input type="text" class="form-control" id="tags" name="tags" value="{{ ''.join(post['tags']) }}" />
		  </div>
		  <input type="submit" class="btn btn-primary" />
		</form>
	</div>	
{% endblock main %}